
import 'package:flutter/services.dart';

class DeviceDirection{

  ///横屏
  static Future<void> landscape() async {
    await SystemChrome.setPreferredOrientations(
        [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight]);
  }

  ///竖屏
  static Future<void> portrait() async {
    await SystemChrome.setPreferredOrientations(
        [DeviceOrientation.portraitUp]);
  }
}